<script type="text/javascript" src="<?php echo base_url()?>js/back_end/lib.js"></script>
<div id="content-right">
	<div id="add-product">
		<div id="sidebar-list" class="black">
			<div id="img-product" class="left white">
				 <?php echo $title?>
			</div>
			<div id="img-back" class="right">
				<a href="javascript:;" onclick="history.go(-1)" class="white">Quay lại trang trước </a>
			</div>
			<div class="clear"></div>
		</div>
		<form name="AdminPermission" id="AdminPermission" action="" method="POST">
			<div id="list-product">
				<table id="myTable" class="tablePr tablesorter" width="100%" border="0" cellspacing="0" cellpadding="0">
					<thead>
						<tr class="headerTbl">
							<td width="10%">STT</td>
							<td width="65%">Tên Menu</td>
							<td width="35%">Truy Cập</td>							
						</tr>						
					</thead>
					<tbody>
						<?php
							$i = 1;
							foreach ($admin_permiss as $m)
							{
								$PerCheck="";
							 	$PostCheck="";
							 	$EditCheck="";
							 	$DelCheck="";
							 	$PostDisable="";
							 	$EditDisable="";
							 	$DelDisable="";		
							 	$PerDisable="";							 	
							 	
							 	if ($i % 2 == 0)
							 	{
							 		$bgcolor="str1";
							 	}else{
							 		$bgcolor="str2";
							 	}
						?>						
						<tr class="<?php echo $bgcolor?>">
							<td><input type="hidden" name="menu_id_1_<?php echo $m['id'] ?>" value="<?php echo $m['id'] ?>" /><?php echo $i?></td>
							<td><?php echo $m['name']?></td>
							<td>
							<?php 
								$menuID = "";
								foreach($permis as $per)
								{
									if($per['menu_admin_id'] == $m['id'] && $per['access'] == 1 && $per['group_admin_id'] == $group_admin_id)
									{
										$menuID = $m['id']; 
									}
								}?>
								<input type="checkbox" name="Per_<?php echo $m['id']?>" value="1" id="Per_<?php echo $m['id']?>" <?php if($menuID == $m['id']){echo 'checked=checked';}?> onClick="JavaScript:CheckBoxPermission(<?php echo $m['id']?>,0);">
							</td>							
						</tr>						
						<?php $i++;}?>
						<tr>
							<td colspan="6" align="left">
								<input type="submit" class="submit-product" name="cmd" value="Update" style="color: #FFF; font-weight: bold; padding-bottom: 5px;" />
								<input type="reset" class="reset-product"  value='Cancel' style="color: #FFF; font-weight: bold; padding-bottom: 5px;" />
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</form>
	</div>
</div><!-- end  content-right -->	